package com.xtaller.test.service.IService;

import com.xtaller.test.base.BaseServiceImpl;
import com.xtaller.test.mapper.BaseUserMapper;
import com.xtaller.test.model.BaseUser;
import com.xtaller.test.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @version V1.0
 * @author: Taller
 * @date: 2019-09-05
 * @Description:
 */
@Service
public class UserServiceIpml extends BaseServiceImpl<BaseUserMapper, BaseUser> implements UserService {
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean batch(List<BaseUser> users) {
        users.stream().forEach(x -> {
            this.model(x);
        });
        return true;
    }
}
